**# Bookmark #1
*Figure 13: Mean Importance by Category of variable

***************************************************************************************
**********************Mean Importance by Category (Ginsburg categories)****************
***************************************************************************************


use "Data_ImportantProvisions_240423.dta", clear


gen order3 = .
replace order3 = 1 if cat1 == "Rights and Duties"
replace order3 = 2 if cat1 == "Judiciary"
replace order3 = 3 if cat1 == "Legislature" 
replace order3 = 4 if cat1 == "Executive"
replace order3 = 5 if cat1 == "Principles and Symbols"
replace order3 = 6 if cat1 == "Elections"
replace order3 = 7 if cat1 == "Culture and Identity"
replace order3 = 8 if cat1 == "Regulation and Oversight"
replace order3 = 9 if cat1 == "International Law"
replace order3 = 10 if cat1 == "Federalism" 
replace order3 = 11 if cat1 == "Special Sections" 
replace order3 = 12 if cat1 == "Amendment"


*stacked bar chart
graph hbar mean_func_democ mean_new_democ mean_divided_democ, over(cat1, sort(order3) lab(labsize(vsmall))) ytitle("Mean Score") legend(order(1 "Functioning Democracy" 2 "New Democracy" 3 "Divided Democracy") pos(6) row(1)) bar(1, color(navy)) bar(2, color(forest_green)) bar(3, color(purple) ) blabel(bar, color(black) position(inside) format(%4.2f) size(tiny) gap(-2.5))
graph export "Figure_13.pdf", replace
